1. Field of the Invention
This invention relates to an illumination flicker detection apparatus, an illumination flicker compensation apparatus, and an ac line frequency detection apparatus, methods of detecting illumination flicker, compensating flicker, and measuring ac line frequency.
2. Description of the Prior Art
An illumination flicker detection apparatus for detecting flicker in a video signal which is generated by a video camera under illumination by fluorescent lamps are known. Moreover, a video signal processing apparatus for suppressing the affection by flicker in the video signal is also known.
When image is taken by a video camera under illumination by fluorescent lamps, there is a problem of flicker. Illumination level of the fluorescent lamp periodically changes with voltage variation of the ac line. FIGS. 19A to 19D are illustrations of a prior art showing a relation between luminance changes of fluorescent lamps and the image shooting operation. If the cycle of the voltage of ac line is 50 Hz as shown in FIG. 19A, the luminance of a fluorescent lamp changes at 100 Hz as shown in FIG. 19B.
FIG. 19C is an illustration showing operation of a prior art video camera. If a video camera or an electronic camera employing a MOS type of imager is used under illumination by fluorescent lamps at a shutter speed of {fraction (1/30)} sec, charge storing timings and the luminance level of the video signal are shown in FIG. 19C.
The MOS type of imager outputs a first line from timing A1 to B1 and a second line from timings A2 to B2 which timings A2 and B2 are slightly shifted in time base from the timings A1 and B1 as shown in FIG. 19C. As shown in FIG. 19B, the luminance level changes, so that a luminance level of the image changes at a cycle of {fraction (1/100)} sec, which is sensed by a watcher as black stripes on the reproduced image.
Particularly, in the case of the MOS type of imager, the reproduced image shows stripes over the to-be-reproduced image because the image storing timings are different with respect to the variation in the luminance of the fluorescent lamps every line.
FIGS. 20A to 20D are illustrations of a prior art showing a relation between luminance changes of fluorescent lamps and image shooting operation at 60 Hz. If the cycle of the voltage of ac line is 60 Hz as shown in FIG. 20A, the luminance of a fluorescent lamp changes at 120 Hz as shown in FIG. 20B.
FIG. 20C is an illustration showing operation of a prior art video camera. If a video camera or an electronic camera employing MOS type of imager is used under illumination by fluorescent lamps at a shutter speed of {fraction (1/50)} sec, charge storing timings and the luminance level of the video signal are shown in FIG. 20C.
In the MOS type of imager, rays entering respective pixels on a first line are converted into charges which are accumulated from timings A11 to B11 and charges on a second line are accumulated from timings A21 to B21 which timings A21 and B21 are slightly shifted in time base from the timings A11 and B11. As shown in FIGS. 20B and 20C, the luminance level changes, so that brightness level of the shot image changes, which is sensed by a watcher as black stripes on the reproduced image.
In the case of 60 Hz, because the frame interval is an integer times the illumination level variation period, luminance level variation does not occur every frame. However, if the ac line frequency varies around 60 Hz, black stripes move every frame, so that quality of the reproduced image is deteriorated. In the MOS type of imager, charge accumulating timings are different from each other as similarly as the case of 50 Hz, so that the flicker occurs within one frame, which is sensed by watcher as black stripe on the reproduced image.
A prior art flicker compensating apparatus for compensating the video signal is also known. Japanese patent application provisional publication No. 8-15324 discloses such a flicker compensating apparatus. This flicker compensating apparatus detects the presence or absence of flicker by an integrating result of a video signal at the present field and an integrating result of the video signal at the previous field and comparing the difference between the present and the previous fields with a threshold level and switching the shutter speed in accordance with the presence and the absence of flicker.
The aim of the present invention is to provide superior illumination flicker detection apparatus, illumination flicker compensation apparatus and ac line frequency measuring apparatuses and superior methods of detecting illumination flicker, compensating flicker, and measuring ac line frequency.
According to the present invention, a first aspect of the present invention provides an illumination flicker detection apparatus comprising: integrating means for integrating levels of a video signal at pixels at each of unit areas included in a frame or field of said video signal; averaging means for averaging said integrated level at each of said unit areas at said frame or field and said integrated level at the corresponding unit area at an adjacent previous frame or field; dividing means for effecting division between results of said averaging and integrating means every unit area; and flicker judging means for judging whether flicker exists in said video signal by frequency-analyzing results of said dividing means at said unit areas and outputting a judging result.
Preferably, said unit area is a horizontal line.
Preferably, said unit area is a plurality of adjacent horizontal lines where variation in said levels due to said flicker is negligible.
Preferably, each of said unit areas includes a plurality of horizontal lines with interval at a frame, which horizontal line show the same phase in flicker component in said video signal.
Preferably, said averaging means comprising a circulation type of filter.
Preferably, said averaging means comprising a Finite Impulse Response filter.
Preferably, the illumination flicker detection apparatus further comprises: first summing means for summing said result of said integrating means at said frame or field and said result of said integrating means at another frame or field at every said unit area; and second summing means for summing said results of said averaging means at said frame or field and said result of said averaging means at said another frame or field at every unit area, wherein said another frame or field is prior to said frame or field by a predetermined number of frames or fields which is determined by a frequency of said flicker and a frame frequency of said video signal and said dividing means effects said division between said results of first and second summing means.
Preferably, the illumination flicker detection apparatus further comprises: first summing means for summing said results of said integrating means of a predetermined number of adjacent frames or fields at every unit area, said adjacent frames or fields including said frame or field; and second summing means for summing said results of said averaging means of said adjacent frames or fields at every unit area, wherein said dividing means effects said division between said results of first and second summing means.
Preferably, the illumination flicker detection apparatus, further comprises another averaging means for averaging said results of said dividing means at a plurality of said unit areas at said frame or field, wherein each of said unit areas includes a plurality of horizontal lines with interval at a frame, said horizontal lines showing the same phase in flicker component in said video signal.
Preferably, the illumination flicker detection apparatus, further comprises threshold level generating means for generating a threshold level in accordance with a shutter speed control signal which is used for generating said video signal, wherein said flicker judging means judges whether said flicker exists in said video signal using said threshold level.
According to the present invention, a second aspect of the present invention provides an illumination flicker compensation signal generation apparatus comprising: integrating means for integrating levels of a video signal at pixels at each of unit areas included in a frame or field of said video signal; averaging means for averaging said integrated level at each of said unit areas at said frame or field and said integrated level at the corresponding unit area at an adjacent frame or field; dividing means for effecting division between results of said averaging and integrating means every unit area; flicker judging means for judging whether flicker exists in said video signal by frequency-analyzing results of said dividing means at said unit areas and outputting a judging result; and flicker compensation means for generating a shutter speed control signal and an automatic gain controlling signal for generating said video signal in accordance with said judging result of said flicker judging means to compensate flicker in said video signal.
According to the present invention, a third aspect of the present invention provides a method of detecting flicker in a video signal comprising the steps of: (a) integrating video levels of a video signal at pixels at each of unit areas included in a frame or field of said video signal; (b) averaging said integrated level at each of said unit areas at said frame or field and said integrated level at the corresponding unit areas at an adjacent frame or field; (c) effecting division between results of said steps of (a) and (b) every unit area; and (d) judging whether flicker exists in said video signal by frequency-analyzing results of said step (c) at said unit areas and outputting a judging result.
According to the present invention, a fourth aspect of the present invention provides a method of compensating flicker in a video signal comprising the steps of: (a) integrating video levels of a video signal at pixels at each of unit areas included in a frame or field of said video signal; (b) averaging said integrated level at each of said unit areas at said frame or field and said integrated level at the corresponding unit areas at an adjacent frame or field; (c) effecting division between results of said steps of (a) and (b) every unit area; (d) judging whether flicker exists in said video signal by frequency-analyzing results of said step (c) at unit areas and outputting a judging result; and (e) generating a shutter speed control signal and an automatic gain controlling signal in accordance with said judging result of said step (d) to compensate flicker in said video signal.
According to the present invention, a fifth aspect of the present invention provides an illumination flicker detection apparatus comprising: integrating means for integrating levels of a video signal at pixels at each of unit areas included in a frame or field of said video signal; averaging means for averaging said integrated level at each of said unit areas at said frame or field and said integrated level at the corresponding unit area at an adjacent frame or field; still portion judging means for judging whether image at every block including a portion of said unit areas at a frame is still in accordance with result of said integrating means; dividing means for effecting division between results of said averaging and integrating means every unit area; and flicker judging means for judging whether flicker exists in said video signal in accordance with results of said dividing means and said still portion judging means.
Preferably, said unit area is a horizontal line.
Preferably, said unit area is a plurality of adjacent horizontal lines where variation of said video levels due to said flickering is negligible.
Preferably, said blocks are arranged in the vertical direction at a frame or a field, a vertical length of each block is determined in accordance with an integer times one cycle of illumination variation due to an ac line voltage, used for generating said video signal and a frame frequency of said video signal. Moreover, still portion judging means may comprise: summing means for summing integration results of unit areas at every said block; variation detection means for detecting variation in result of said summing means between each of said blocks of the present frame or field and the corresponding block of a previous frame or field; and comparing means for comparing said variation with a threshold value, wherein said still portion judging means judges that image at each of said blocks is still when said variation is lower than said threshold value.
In this case, said variation detection means may comprise: difference calculation means for calculating a difference in results of said summing means between each of said blocks of the present frame or field and the corresponding block of a previous frame or field; dividing means for dividing result of said difference calculating means by said result of said summing means of said present frame or field; and comparing means for comparing result of said dividing means with a threshold value, wherein said still portion judging means judges that image at each of said blocks is still when said result of said dividing means is lower than said threshold value. Preferably, said variation detection means comprises: variation detection averaging means for averaging results of said summing means between present and previous frames or fields at each of said blocks; difference calculation means for calculating a difference in result of said summing means and said result of said variation detection averaging means; dividing means for dividing result of said difference calculating means by said result of said summing means of said present frame or field; and comparing means for comparing result of said dividing means with a threshold value, wherein said still portion judging means judges that image at every block areas is still when said result of said dividing means is lower than said threshold value.
According to the present invention, a sixth aspect of the present invention provides an illumination flicker compensation signal generation apparatus comprising: integrating means for integrating levels of a video signal at pixels at each of unit areas included in a frame or field of said video signal; averaging means for averaging said integrated level at each of said unit areas at said frame or field and said integrated level at the corresponding unit area of at least an adjacent frame or field; still portion judging means for judging whether image at every block including a portion of said unit areas at a frame is still in accordance with result of said integrating means; dividing means for effecting division between results of said averaging and integrating means every unit area; flicker judging means for judging whether flicker exists in said video signal in accordance with results of said dividing means and said still portion judging means; and flicker compensation means for generating a shutter speed control signal and an automatic gain controlling signal for generating said video signal in accordance with said judging result of said flicker judging means to compensate flicker in said video signal.
According to the present invention, a seventh aspect of the present invention provides a method of compensating flicker in a video signal comprising the steps of: (a) integrating levels of a video signal at pixels at each of unit areas included in a frame or field of said video signal; (b) averaging said integrated level at each of said unit areas at said frame or field and said integrated level at the corresponding unit area at an adjacent frame or field; (c) judging whether image at every block including a portion of said unit areas is still in accordance with result of said step (a); (d) effecting division between results of said steps of (a) and (b) every unit area; and (e) judging whether flicker exists in said video signal in accordance with results of said steps (c) and (d).
According to the present invention, an eighth aspect of the present invention provides a method of compensating flicker in a video signal comprising the steps of: (a) integrating levels of a video signal at pixels at each of unit areas included in a frame or field of said video signal; (b) averaging said integrated level at each of said unit areas at said frame or field and said integrated level at the corresponding unit area at an adjacent frame or field; (c) judging whether image at every block including a portion of said unit areas is still in accordance with result of said step (a); (d) effecting division between results of said steps of (a) and (b) every unit area; and (e) judging whether flicker exists in said video signal in accordance with results of said steps (c) and (d); and (f) generating a shutter speed control signal and an automatic gain controlling signal for generating said video signal in accordance with said judging result of said step (e) to compensate flicker in said video signal.
According to the present invention, a ninth aspect of the present invention provides an ac line frequency detection apparatus comprising: flicker component detection means for detecting a flicker component in a video signal generated with illumination of which luminance varies with ac line voltage; and flicker judging means for judging whether flicker exists in said video signal in accordance with said detected flicker component and outputting the judging result.
Preferably, said flicker component detection means comprises: integrating means for integrating levels of said video signal at pixels at each of unit areas included in a frame or field of said video signal; averaging means for averaging said integrated level at each of said unit areas at said frame or field and said integrated level at the corresponding unit area at an adjacent frame or field; dividing means for effecting division between results of said averaging and integrating means every unit area to output said detected flicker component.
Preferably, said flicker judging means comprises: variation analyzing means for analyzing variation of said detected flicker component with respect to horizontal lines.
Preferably, said flicker judging means comprises: spectrum analyzing means for analyzing spectrum of said flicker component.
Preferably, said unit area is a horizontal line.
Preferably, the ac line frequency measuring apparatus further comprises: imaging means for generating a video signal with illumination of which luminance varies with ac line voltage.
According to the present invention, a ten aspect of the present invention provides a method of measuring an ac line frequency comprising the steps of: (a) detecting a flicker component in a video signal generated with illumination of which luminance varies with ac line voltage; and (b) judging whether flicker exists in said video signal in accordance with said detected flicker component.